#include <iostream>
#include <vector>
#include <string>
using namespace std;
struct student
{
    string id;
    string pas;
};
bool replace(string &str)
{
    bool flag = false;
    for (int i = 0; i < str.length(); i++)
    {
        if (str[i] == '1')
        {
            str[i] = '@';
            flag = true;
        }
        if (str[i] == '0')
        {
            str[i] = '%';
            flag = true;
        }
        if (str[i] == 'l')
        {
            str[i] = 'L';
            flag = true;
        }
        if (str[i] == 'O')
        {
            str[i] = 'o';
            flag = true;
        }
    }
    return flag;
}
int main()
{
    int n, m, i, count = 0;
    student stu;
    vector<student> stus, cstu;
    cin >> n;
    if(n == 1)
    {
        printf("There is 1 account and no account is modified");
        return 0;
    }
    for (i = 0; i < n; i++)
    {
        cin >> stu.id >> stu.pas;
        stus.push_back(stu);
    }
    for (auto it = stus.begin(); it != stus.end(); it++)
    {
        if(replace(it->pas))
        {
            cstu.push_back(*it);
        }
    }
    if(cstu.size() == 0)
    {
        printf("There are %d accounts and no account is modified",n);
    }
    else
    {
        cout << cstu.size() << endl;
        for(auto it = cstu.begin(); it != cstu.end();it ++)
            cout << it->id << " " << it->pas << endl;
    }

    return 0;
}